package javaTest;

import java.util.PriorityQueue;

public class Prior {
    public int[]smallestK(int []arr,int k){
        PriorityQueue<Integer> priorityQueue=new PriorityQueue();
        for(int i=0;i<arr.length;i++){
            priorityQueue.offer(arr[i]);
        }
        int []ret=new int[k];
        for(int i=0;i<k;i++){
            ret[i]=priorityQueue.poll();
        }
        return ret;
    }

    //
    class Card{
        public String suit;
        public int rank;

        @Override
        public boolean equals(Object obj) {
            return super.equals(obj);
        }

        @Override
        public String toString() {
            return super.toString();
        }
    }







}


